var navBtn = document.querySelector('.nav-btn');
var navList = document.querySelector('.nav-list');
var login = document.querySelector('.login');
var t = true;
navBtn.addEventListener('click',function(){
	if(t){
		navList.style.height = '690px';
		login.style.height = '26px';
		t = false;
	}else{
		navList.style.height = '0';
		login.style.height = '0';
		t = true;
	}
})


var bar = document.querySelector('.bar-con-1');
var to = document.querySelector('#top-icon')
window.onscroll=function(){
	if(document.documentElement.scrollTop > 1200 || document.body.scrollTop > 1200){
		to.style.display = 'block'
	}else{
		to.style.display = 'none'
	}
}
to.addEventListener('click',function(){
	if(document.documentElement.scrollTop > bar.offsetTop){
		window.scrollTo({
			top: 0,
			behavior: 'smooth'
		})
	}else{
		window.scrollTo(0,0)
	}
})